package cn.wolfcode.crm.web.controller;

import cn.wolfcode.crm.domain.SaleAccount;
import cn.wolfcode.crm.query.SaleChartObjectQuery;
import cn.wolfcode.crm.service.ISaleAccountService;
import com.alibaba.fastjson.JSON;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.*;

@RequestMapping("charts")
@Controller
public class SaleAccountController {
    @Autowired
    private ISaleAccountService saleAccountService;


    @RequestMapping("index")
    private String index(){
        return "charts/sale";
    }


    @RequestMapping("list")
    @ResponseBody
    private List<Map<String,Object>> list( SaleChartObjectQuery qo){
        return saleAccountService.listSaleChart(qo);
    }

}
